package com.huike.utils;

public class ResultMessage {
    private boolean result;//true为请求成功，false请求失败
    private int status;//状态码200为成功，其他为失败
    private String message;//返回附带信息

    public ResultMessage(boolean result, String message) {
        this.result = result;
        this.message = message;
    }

    public ResultMessage(int status, String message) {
        this.status = status;
        this.message = message;
    }

    public static ResultMessage success(){
        return new ResultMessage(true,"success");
    }

    public static ResultMessage fail(){
        return new ResultMessage(false,"fail");
    }

    public boolean isResult() {
        return result;
    }

    public void setResult(boolean result) {
        this.result = result;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}